﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpages/Main.master" AutoEventWireup="true"
    CodeFile="AllProjectsDetailsPaged.aspx.cs" Inherits="User_Shares_AllProjectsDetailsPaged" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../../Controls/ContentHolder/Holder1.ascx" TagName="Holder1" TagPrefix="uc1" %>
<%@ Register Src="../../Controls/ContentHolder/Holder2_wo_Header.ascx" TagName="Holder2_wo_Header"
    TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        
    </style>
    <script type="text/jscript">
        $("#cent").center();
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:LoginView ID="LoginViewSearch" runat="server">
                <RoleGroups>
                    <asp:RoleGroup Roles="admin,bonyadshahrestan,fourthfactor,employer,edituser,viewuser">
                        <ContentTemplate>
                            <div id="adminToolsContainer" style="background-color: #CCCCFF;">
                                <div class="append-7" style="background-color: #CCCCFF; margin: 5px auto; direction: rtl;
                                    text-align: right;">
                                    <asp:CheckBox ID="CheckBoxAdvisor" runat="server" Text="مشاوران" Checked="true" OnCheckedChanged="CheckBox_CheckedChanged"
                                        AutoPostBack="True" />
                                    <asp:CheckBox ID="CheckBoxSurveyor" runat="server" Text="نقشه برداران" Checked="true"
                                        OnCheckedChanged="CheckBox_CheckedChanged" AutoPostBack="True" />
                                </div>
                                <br />
                                <div id="sort">
                                    <asp:DropDownList ID="DropDownListSort" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownChanged">
                                        <asp:ListItem Selected="True" Text="روستا" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="نام مشاور یا نقشه بردار" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="شماره قرارداد" Value="2"></asp:ListItem>
                                        <asp:ListItem Text="شهرستان" Value="3"></asp:ListItem>
                                    </asp:DropDownList>
                                    <br />
                                    <asp:RadioButton ID="RadioButtonAsc" runat="server" Text="افزایشی" GroupName="sort"
                                        AutoPostBack="True" Checked="true" OnCheckedChanged="RadioButton_CheckedChanged" />
                                    <br />
                                    <asp:RadioButton ID="RadioButtonDec" runat="server" Text="کاهشی" GroupName="sort"
                                        AutoPostBack="True" OnCheckedChanged="RadioButton_CheckedChanged" />
                                </div>
                            </div>
                        </ContentTemplate>
                    </asp:RoleGroup>
                    <asp:RoleGroup Roles="Surveyor,advisor">
                        <ContentTemplate>
                            <br />
                            <div style="background-color: #1E90FF; padding: 10px;" class="span-15 roundCorner">
                                <asp:Label ID="Label1" runat="server" Text=" مرتب سازی بر اساس:"></asp:Label>
                                <br />
                                <asp:DropDownList ID="DropDownListSortAdvisor" runat="server" AutoPostBack="true"
                                    OnSelectedIndexChanged="DropDownChanged">
                                    <asp:ListItem Selected="True" Text="روستا" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="شماره قرارداد" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="شهرستان" Value="3"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </ContentTemplate>
                    </asp:RoleGroup>
                </RoleGroups>
            </asp:LoginView>
            <br />
            <uc1:Holder1 ID="Holder11" runat="server" Title="لیست پروژه ها صفحه بندی شده">
                <ContentTemplate>
                    <div style="margin: auto;" class="cent">
                        <asp:GridView ID="GridViewProjects" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
                            AllowPaging="True" AllowSorting="True" PageSize="10" BackColor="#CCCCFF" OnPreRender="GridViewProjects_PreRender"
                            OnRowDataBound="GridViewProjects_RowDataBound" FooterStyle-BackColor="#3399FF">
                            <EmptyDataTemplate>
                                <asp:Label ID="LabelEmptyText" runat="server" Text="هیچ گزینه ای برای نمایش وجود ندارد"></asp:Label>
                            </EmptyDataTemplate>
                            <AlternatingRowStyle BackColor="#DDD9FF" />
                            <Columns>
                                <asp:BoundField DataField="AdvisorFullName" HeaderText="نام مشاور" />
                                <asp:BoundField DataField="City" HeaderText="نام شهرستان" />
                                <asp:BoundField DataField="Bakhsh" HeaderText="نام بخش" />
                                <asp:BoundField DataField="Dehestan" HeaderText="نام دهستان" />
                                <asp:BoundField DataField="VillageName" HeaderText="نام روستا" />
                                <asp:BoundField DataField="ContractDate" HeaderText="تاریخ قرارداد" ItemStyle-Width="100" />
                                <asp:BoundField DataField="ContractNumber" HeaderText="شماره قرارداد" ItemStyle-Font-Bold="true"
                                    ItemStyle-ForeColor="Black" />
                                <%-- <asp:TemplateField HeaderText="پیشرفت">
                            <ItemTemplate>
                                <asp:Label ID="LabelProgress" runat="server" Text='<%# Eval( "Progress" ) + " %" %>'
                                    Style="clear: both; display: inline;"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>--%>
                                <asp:BoundField DataField="ContractTypeText" HeaderText="نوع  قرارداد" />
                                <asp:TemplateField HeaderText="دیرکرد">
                                    <ItemTemplate>
                                        <asp:Label ID="LabelDelay" runat="server" Text='<%# Eval( "Delay" ) + " روز" %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Button ID="ButtonSeeMore" runat="server" CommandArgument='<%# Eval( "ContractId" ) %>'
                                            CommandName="ContractId" OnClick="ButtonSeeMore_Click" Text="مشاهده" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BackColor="#688CF5" ForeColor="#000066" />
                            <PagerStyle BackColor="#688CF5" />
                            <PagerTemplate>
                                <div class="append-11 footer">
                                    <asp:UpdatePanel ID="UpdatePanelFooter" runat="server">
                                        <ContentTemplate>
                                            <table cellpadding="3px" cellspacing="5px">
                                                <tr>
                                                    <td>
                                                        <asp:LinkButton ID="LinkButtonLast" runat="server" OnClick="LinkButtonLast_Click">آخرین</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="LinkButtonNext" runat="server" OnClick="LinkButtonNext_Click">بعدی</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="LinkButtonPrevious" runat="server" OnClick="LinkButtonPrevious_Click">قبلی</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="LinkButtonFirst" runat="server" OnClick="LinkButtonFirst_Click">اولین</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                            <asp:Label ID="LabelPageNumber" runat="server" Text="Label"></asp:Label>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                            </PagerTemplate>
                        </asp:GridView>
                    </div>
                </ContentTemplate>
            </uc1:Holder1>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="LoginViewSearch" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
